package org.sn.jdish.spring.demo.biz;

import org.sn.jdish.spring.demo.vo.DemoVo;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;

@Service
public class DemoBiz {

	@Cacheable(value = "DEMO:CACHE", key = "#root.methodName+':'+#p0.hashCode()")
	public String sayHello(String name) {
		return "hello, " + name;
	}

	@Cacheable(value = "DEMO:CACHE", key = "#root.methodName+':'+#p0.hashCode()")
	public String sayHello(DemoVo vo) {
		return "hello, " + vo.getName();
	}

}
